<div class="block-content block-content-full">
    <div class="form-group row">
        {!! Form::label('name', '姓名:',['class' => 'col-form-label col-sm-1']) !!}
        <div class="col-sm-5">
            {!! Form::text('name', null, ['class' => 'form-control', 'placeholder' => '真实姓名', 'required']) !!}
        </div>
    </div>
    <div class="form-group row">
        {!! Form::label('username', '用户名:', ['class' => 'col-form-label col-sm-1']) !!}
        <div class="col-sm-5">
            {!! Form::text('username', null, ['class' => 'form-control', 'placeholder' => '登录账户', 'required']) !!}
        </div>
    </div>

    <div class="form-group row">
        {!! Form::label($password, '密码:', ['class' => 'col-form-label col-sm-1']) !!}
        <div class="col-sm-5">
            {!! Form::password($password, ['class' => 'form-control', 'placeholder' => '密码不少于6位字符']) !!}
        </div>
    </div>

    <div class="form-group row">
        {!! Form::label('role_id', '角色选择:',['class' => 'col-form-label col-sm-1']) !!}
        <div class="col-sm-10">
            @foreach($roles as $role)
                <div class="custom-control custom-checkbox custom-control-inline">
                    <input type="checkbox" class="custom-control-input" id="role_id_{{$role->id}}" name="role_id[]"
                           @if(isset($RoleUsers) && in_array($role->id,current($RoleUsers))) checked @endif value="{{$role->id}}">
                    <label class="custom-control-label" for="role_id_{{$role->id}}">{{$role->name}}</label>
                </div>
            @endforeach
        </div>
    </div>
</div>
<div class="block-footer">
    <button type="button" class="btn btn-default" onclick="history.go(-1)">取　消</button>
    <button type="submit" class="btn btn-primary">确　定</button>
</div>

